 export default {
   data(){
     return{
      isCollapse:false,
      username:'',
      store_money:0
     }
   },
   methods: {
     handleOpen(key, keyPath) {
       console.log(key, keyPath);
     },
     handleClose(key, keyPath) {
       console.log(key, keyPath);
     },
     //退出登录
     logout(){
        localStorage.clear()
        //  localStorage.removeItem('userKey')
        //  localStorage.removeItem('username')
        //  localStorage.removeItem()
        window.location.reload()
         //this.$router.push('/login')
     }
   },

   created(){
        this.username = localStorage.getItem('username')
        // if(!localStorage.getItem('userKey')){
        //     this.$router.push('/login')
        // }
        // // if(!this.$store.state.userKey){
        // //         this.$router.push('/login')
        // // }
   }
 };
